Optimal. Leaf size=43 \[ \frac{\sin (a+x (b-d)-c)}{2 (b-d)}+\frac{\sin (a+x (b+d)+c)}{2 (b+d)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0334101, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {4570, 2637} \[ \frac{\sin (a+x (b-d)-c)}{2 (b-d)}+\frac{\sin (a+x (b+d)+c)}{2 (b+d)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4570
Rule 2637
Rubi steps
\begin{align*} \int \cos (a+b x) \cos (c+d x) \, dx &=\int \left (\frac{1}{2} \cos (a-c+(b-d) x)+\frac{1}{2} \cos (a+c+(b+d) x)\right ) \, dx\\ &=\frac{1}{2} \int \cos (a-c+(b-d) x) \, dx+\frac{1}{2} \int \cos (a+c+(b+d) x) \, dx\\ &=\frac{\sin (a-c+(b-d) x)}{2 (b-d)}+\frac{\sin (a+c+(b+d) x)}{2 (b+d)}\\ \end{align*}
Mathematica [A] time = 0.180851, size = 43, normalized size = 1. \[ \frac{\sin (a+x (b-d)-c)}{2 (b-d)}+\frac{\sin (a+x (b+d)+c)}{2 (b+d)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 40, normalized size = 0.9 \begin{align*}{\frac{\sin \left ( a-c+ \left ( b-d \right ) x \right ) }{2\,b-2\,d}}+{\frac{\sin \left ( a+c+ \left ( b+d \right ) x \right ) }{2\,b+2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.07282, size = 54, normalized size = 1.26 \begin{align*} \frac{\sin \left (b x + d x + a + c\right )}{2 \,{\left (b + d\right )}} - \frac{\sin \left (-b x + d x - a + c\right )}{2 \,{\left (b - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.473431, size = 99, normalized size = 2.3 \begin{align*} \frac{b \cos \left (d x + c\right ) \sin \left (b x + a\right ) - d \cos \left (b x + a\right ) \sin \left (d x + c\right )}{b^{2} - d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.41227, size = 153, normalized size = 3.56 \begin{align*} \begin{cases} x \cos{\left (a \right )} \cos{\left (c \right )} & \text{for}\: b = 0 \wedge d = 0 \\- \frac{x \sin{\left (a - d x \right )} \sin{\left (c + d x \right )}}{2} + \frac{x \cos{\left (a - d x \right )} \cos{\left (c + d x \right )}}{2} - \frac{\sin{\left (a - d x \right )} \cos{\left (c + d x \right )}}{2 d} & \text{for}\: b = - d \\\frac{x \sin{\left (a + d x \right )} \sin{\left (c + d x \right )}}{2} + \frac{x \cos{\left (a + d x \right )} \cos{\left (c + d x \right )}}{2} + \frac{\sin{\left (c + d x \right )} \cos{\left (a + d x \right )}}{2 d} & \text{for}\: b = d \\\frac{b \sin{\left (a + b x \right )} \cos{\left (c + d x \right )}}{b^{2} - d^{2}} - \frac{d \sin{\left (c + d x \right )} \cos{\left (a + b x \right )}}{b^{2} - d^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09072, size = 54, normalized size = 1.26 \begin{align*} \frac{\sin \left (b x + d x + a + c\right )}{2 \,{\left (b + d\right )}} + \frac{\sin \left (b x - d x + a - c\right )}{2 \,{\left (b - d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]